1. Field of the Invention
The present invention relates to an image processing method and an imaging apparatus for smoothing an image while retaining edges.
2. Description of the Related Art
Conventionally, filters are commonly used for digital image noise reduction in order to improve the quality of a digital still image or a digital movie.
Filters commonly used to improve image quality include Gaussian filters, median filters, and bilateral filters etc. which smoothes an image by referencing the surrounding pixels about a target pixel for correction (a focus pixel).
Gaussian filters consider the spatial position of a point and assigns heavy weights to pixels that are close to the focus pixel and light weights to pixels far from the focus pixel, and the filtering process obtains the weighted average. Median filters sort the values of the focus pixel and its surrounding pixels, and takes their median value to reduce noise, and this is commonly used for noise reduction. However, these filtering technologies have a problem where the edges of an image will also smudge with removal of noise. Therefore, bilateral filters, called edge-retaining filters, are used to retain edges of an image while reducing noise.
This filter assigns Gaussian weights to “the difference in intensity value compared to a focus pixel” and obtains the average as indicated in the equation below. Edges are retained by assigning light weights to parts where there are great changes in intensity.
            f      i        =                            ∑          j                ⁢                              w            ⁡                          (                              i                ,                j                            )                                ⁢                      d            j                                                ∑          j                ⁢                  w          ⁡                      (                          i              ,              j                        )                                ,          ⁢            w      ⁡              (                  i          ,          j                )              =                            w          x                ⁡                  (                                    x              i                        ,                          x              j                                )                    ⁢                        w          d                ⁡                  (                                    d              i                        ,                          d              j                                )                    
xj: Position (Coordinate) of pixel j, dj: Intensity of pixel j
wx: Weight according to position (position weight),
wd: Weight dependent on intensity (including colors)
In order to detect edges more accurately, proposed in this document is a method of capturing multiple images using different methods, detecting edges for each image, and applying a bilateral filter to the set of images. (For example, refer to Patent Document 1)    Patent Document 1: Japanese Unexamined Patent Application Publication No. 2006-180268